/**
 * 
 */
package com.google.code.head2head.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 * 
 * @author Eric Bellard - bellard@supagro.inra.fr Copyright © 2007 INRA. All
 *         rights reserved.
 */
@Entity
public class Entry {
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long id;
	private String fistImageUrl;
	private String secondImageUrl;
	@OneToOne
	private WebUser user;
	private String description;
	private String title;
	private String language;
	private Date date;
	
	@org.hibernate.annotations.CollectionOfElements
	private Set<String> ips = new HashSet<String>();
	
	@OneToMany(fetch=FetchType.EAGER, mappedBy="entry")
	private Set<Grade> grades = new HashSet<Grade>();
	
	@org.hibernate.annotations.CollectionOfElements
	private Set<String> tags = new HashSet<String>();
	
	@OneToMany
	private Set<Tag> trueTags = new HashSet<Tag>();

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the fistImageUrl
	 */
	public String getFistImageUrl() {
		return fistImageUrl;
	}

	/**
	 * @param fistImageUrl
	 *            the fistImageUrl to set
	 */
	public void setFistImageUrl(String fistImageUrl) {
		this.fistImageUrl = fistImageUrl;
	}

	/**
	 * @return the secondImageUrl
	 */
	public String getSecondImageUrl() {
		return secondImageUrl;
	}

	/**
	 * @param secondImageUrl
	 *            the secondImageUrl to set
	 */
	public void setSecondImageUrl(String secondImageUrl) {
		this.secondImageUrl = secondImageUrl;
	}

	/**
	 * @return the user
	 */
	public WebUser getUser() {
		return user;
	}

	/**
	 * @param user
	 *            the user to set
	 */
	public void setUser(WebUser user) {
		this.user = user;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the language
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * @param language
	 *            the language to set
	 */
	public void setLanguage(String language) {
		this.language = language;
	}

	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * @param date
	 *            the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * @return the ips
	 */
	public Set<String> getIps() {
		return ips;
	}

	/**
	 * @param ips
	 *            the ips to set
	 */
	public void setIps(Set<String> ips) {
		this.ips = ips;
	}

	/**
	 * @return the grades
	 */
	public Set<Grade> getGrades() {
		return grades;
	}

	/**
	 * @param grades
	 *            the grades to set
	 */
	public void setGrades(Set<Grade> grades) {
		this.grades = grades;
	}

	/**
	 * @return the tags
	 */
	public Set<String> getTags() {
		return tags;
	}

	/**
	 * @param tags
	 *            the tags to set
	 */
	public void setTags(Set<String> tags) {
		this.tags = tags;
	}

	/**
	 * @return the trueTags
	 */
	public Set<Tag> getTrueTags() {
		return trueTags;
	}

	/**
	 * @param trueTags
	 *            the trueTags to set
	 */
	public void setTrueTags(Set<Tag> trueTags) {
		this.trueTags = trueTags;
	}
	
	
	
}
